package org.zachary.imitation.raft.core;

import org.zachary.imitation.raft.JRaftServiceFactory;
import org.zachary.imitation.raft.option.RaftMetaStorageOptions;
import org.zachary.imitation.raft.storage.LocalRaftMetaStorage;
import org.zachary.imitation.raft.storage.RaftMetaStorage;

/**
 * Created by guozhaokun on 2024/9/4 11:26.
 */
public class DefaultJRaftServiceFactory implements JRaftServiceFactory {

	@Override
	public RaftMetaStorage createRaftMetaStorage(String uri, RaftMetaStorageOptions options) {
		// 作为默认的服务组件工厂，这里会创建基于本地文件的元数据存储器
		return new LocalRaftMetaStorage(uri);
	}
}
